import request from '@/utils/request'

// 查询药品零售列表
export function listShopping(query) {
  return request({
    url: '/shopping/shopping/list',
    method: 'get',
    params: query
  })
}

// 查询药品零售详细
export function getShopping(noticeId) {
  return request({
    url: '/shopping/shopping/' + noticeId,
    method: 'get'
  })
}

// 新增药品零售
export function addShopping(data) {
  return request({
    url: '/shopping/shopping',
    method: 'post',
    data: data
  })
}

// 修改药品零售
export function updateShopping(data) {
  return request({
    url: '/shopping/shopping',
    method: 'put',
    data: data
  })
}

// 删除药品零售
export function delShopping(noticeId) {
  return request({
    url: '/shopping/shopping/' + noticeId,
    method: 'delete'
  })
}

//保存数据
export function addSaveData(data) {
  return request({
    url: '/shopping/shopping/savePrescription',
    method: 'post',
    data: data
  })
}
